import http from "@/utils/request"
// 条件获取摄像头信息
export function getAllMonitor(current,size,params) {
  return http({
    url: `/breed/monitor-base/baseId/${current}/${size}`,
    method: 'get',
    params
  });
}

//修改摄像头状态
export function changeStatusCode(id,statusCode) {
  return http({
    url: `/breed/monitor-base/modify/${id}/${statusCode}`,
    method: 'post',
  });
}

//修改摄像头信息
export function upDate(id,data) {
  return http({
    url: `/breed/monitor-base/update/${id}`,
    method: 'post',
    data: data
  });
}

//删除摄像头信息
export function deleteMonitor(id) {
  return http({
    url: `/breed/monitor-base/${id}`,
    method: 'delete',
  });
}

//添加摄像头信息
export function addMonitor(data) {
  return http({
    url: `/breed/monitor-base/add`,
    method: 'post',
    data: data
  });
}

//根据id更新摄像头token
export function updateToken(id) {
  return http({
    url: `/breed/monitor-base/updateToken/${id}`,
    method: 'post'
  });
}